<?php
/**
 * 提现
 */
defined('IN_YuLin') || exit('NO PERMIT!');
UserLogin(U($m.'/'.$c.'/'.$a));
$user = $_user;
if(IS_POST)
{
    //
}

if($a == 'check')
{
    $pd = $_POST['pd'];
    if(!$pd)
    {
        AjaxReturn(1,'参数错误');
    }
}


$banklist = $db->getall('SELECT * FROM '.Table('user_bank').' where uid = '.$user['id']);
$usedmoney = $db->getrow('SELECT SUM(money) as p FROM '.Table('user_money_cash').' where uid = '.$user['id']);
$usedmoney = round($usedmoney['p'],2);

$t = time();
$start = mktime(0,0,0,date("m",$t),date("d",$t),date("Y",$t));
$end = mktime(23,59,59,date("m",$t),date("d",$t),date("Y",$t));

$count = $db->getrow('SELECT SUM(money) as p FROM '.Table('user_money_cash').' where uid = '.$user['id'].' and dateline >= '.$start.' and dateline <= '.$end);
$count =  5 - intval($count['p']);
$tpl->display('member/moneytx');

?>